package com.example.demo.member.model;

import java.io.Serializable;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 玩家表
 * </p>
 *
 * @author meixiaoliang@qq.com
 * @since 2021-12-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Player implements Serializable {

    private static final long serialVersionUID = 1736890724720131559L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long              id;

    /**
     * 姓名
     */
    private String            name;

    private String            apiKey;

    private String            secretKey;

    private String            passphrase;

    /**
     * 是否模拟盘
     */
    private Boolean           isSimulation;

    /**
     * 是否可交易
     */
    private Boolean           isTrade;

    /**
     * 是否显示
     */
    private Boolean           isShow;

    /**
     * 顺序
     */
    private Integer           num;

    /**
     * 是否有效
     */
    @TableField(exist = false)
    private Integer           isUsable;

    /**
     * 交易截止时间。超过 expTime 自动取消(单位：毫秒)
     */
    @TableField(exist = false)
    private Long              expTime;

    /**
     * email地址
     */
    private String            email;

    /** ############################################################################################ */

    /**
     * 账户当前余额
     */
    @TableField(exist = false)
    private BigDecimal        totalEq;

    /**
     * 账户信息的更新时间(时间戳)
     */
    @TableField(exist = false)
    private String            uTime;

    /**
     * 总共保证金
     */
    @TableField(exist = false)
    private BigDecimal        cashBal;

    /**
     * 可用保证金
     */
    @TableField(exist = false)
    private BigDecimal        availEq;

    /**
     * 已用保证金
     */
    @TableField(exist = false)
    private BigDecimal        frozenBal;

    /**
     * 杠杆
     */
    @TableField(exist = false)
    private BigDecimal        notionalLever;

    /**
     * 未实现盈亏
     */
    @TableField(exist = false)
    private BigDecimal        upl;

    /** ############################################################################################ */

}
